import React, {PureComponent} from 'react';
import CategoryImage from 'Image/category.png';
import {CacheLink} from 'react-keeper';
import './index.less';

const data = [
  {
    id: 1,
    name: '优惠礼券',
    icon: ''
  },
  {
    id: 2,
    name: '流量花费',
    icon: ''
  },
  {
    id: 3,
    name: '影视会员',
    icon: ''
  },
  {
    id: 4,
    name: '日常家居',
    icon: ''
  },
  {
    id: 5,
    name: '其他商品',
    icon: ''
  },
];

export default class Index extends PureComponent {
  render() {
    return (
      <div className='category'>
        {data.map(item =>
          <CacheLink to='/goods/category/1' key={item.id}>
            <span className='icon'>
              <img src={CategoryImage} alt={item.name}/>
            </span>
            <span className='name'>{item.name}</span>
          </CacheLink>
        )}
      </div>
    );
  }
}